<h1>Editing user</h1>

<% form_for @user, :url => {:controller => "admin/users", :action => :create} do |f| %> 
<p> 
  <label for="user_firstname">Firstname:</label> 
  <%= f.text_field :firstname, :size => 40 %> 
</p> 
<p>
  <label for="user_lastname">Lastname:</label>
  <%= f.text_field :lastname, :size => 40 %>
</p>
<p> 
  <label for="user_password">Mot de passe:</label> 
  <%= f.password_field :password, :size => 40 %> 
</p>
<p> 
  <label for="user_email">Email:</label> 
  <%= f.text_field :email, :size => 40 %> 
</p>
<p> 
  <label for="user_adress">Adresse:</label> 
  <%= f.text_field :adress, :size => 40 %> 
</p>
<p> 
  <label for="user_cp">Code Postal:</label> 
  <%= f.text_field :cp, :size => 40 %> 
</p>
<p> 
  <label for="user_city">City:</label> 
  <%= f.text_field :city, :size => 40 %> 
</p>
<p>
  <%= f.label :role_id %><br />
  <%= f.select :role_id, Role.selectable.collect{|r| [r.label,r.id]} %>
</p>
<p> 
  <%= f.submit "Ajouter Utilisateur", :class => "submit" %> 
</p>
<% end %>

<%= link_to 'Show', :controller => "admin/users", :action => :show, :id => @user.id %> |
<%= link_to 'Back', :controller => "admin/users" %>